
import grantAuthTpl from './grantAuth.view.html';
import grantAuthCtrl from './grantAuth.controller';

export default ($stateProvider) => {
    "ngInject"
    $stateProvider
        .state('user/auth', {
            url         : "/corp/user/auth/:pid/:id/:core/:cur", // pid: 父级id, id: 当前id, core: 当前用户|岗位 id
            templateUrl : grantAuthTpl,
            controller  : grantAuthCtrl,
            controllerAs: "vm",
            data : {
                grantType: "SYSTEM_USER"
            }
        })
        .state('post/auth', {
            url         : "/corp/post/auth/:pid/:id/:core/:cur", // pid: 父级id, id: 当前id, core: 当前用户|岗位 id
            templateUrl : grantAuthTpl,
            controller  : grantAuthCtrl,
            controllerAs: "vm",
            data : {
                grantType: "SYSTEM_POST"
            }
        })
        .state('role/auth', {
            url         : "/role/auth/:core/:cur",
            templateUrl : grantAuthTpl,
            controller  : grantAuthCtrl,
            controllerAs: "vm",
            data : {
                grantType: "SYSTEM_ROLE"
            }
        })
}


